home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug232 / install < prev    next >
Text File  |  1987-06-17  |  24KB  |  506 lines

  1. .ce
  2. \fBLittle Smalltalk Installation Notes\fP
  3. .sp
  4. .NH
  5. Installation Notes
  6. .PP
  7. There are four basic steps involved in installing the Little Smalltalk
  8. system.  The four steps are; unbundling the sources, editing the sources to
  9. tailor them to the target installation, compiling the sources, and moving
  10. the final binary to the local executables directory.  Each of these four
  11. steps are described in following paragraphs and in succeeding sections.
  12. .ds RF \(DY
  13. .PP
  14. As distributed, the Little Smalltalk source consists of a small number of
  15. files in ``bundle'' format.  A shell script, \fBunbundle\fP, is provided
  16. that creates the various subdirectories used by the system and unbundles
  17. the distribution files into their component parts.  To execute this shell
  18. script, type, in a directory containing all the files in the distribution,
  19. the following command:
  20. .DS I
  21. sh unbundle
  22. .DE
  23. .LP
  24. A large amount of output should follow, indicating files have been
  25. unbundled into subdirectories /sources, /parser, /prelude, /tests, /docs
  26. and /bin.
  27. .PP
  28. There are a small number of editing changes required to tailor the system to
  29. various different environments.  Section 2 describes these changes in detail for
  30. various types of machines and operating systems.
  31. .PP
  32. Once the necessary tailoring has been performed, the system can then be
  33. compiled by typing the command:
  34. .DS I
  35. make install
  36. .DE
  37. .LP
  38. in the base directory (the original directory from which the source was
  39. unbundled).  This command will then invoke further make commands which
  40. produce the parser, the executable system, and the standard prelude.
  41. In addition various self checks for correctness are provided.  Should it be
  42. necessary, various subcomponents of the system can be individually produced
  43. by typing the ``make install'' commands in the appropriate subdirectory.
  44. These commands produce a considerable amount of output.
  45. .PP
  46. Once the system has been compiled and successfully passed all self tests,
  47. the executable file in /bin/st should be linked or moved to the appropriate
  48. location for local executables on the target system.
  49. Finally, the object files for all compilations can be removed by typing
  50. ``make clean''.
  51. .NH 1
  52. Specific Machine Installation Instructions
  53. .PP
  54. A single source form and command syntax cannot be used for all combinations of
  55. machine / operating systems, because of differences in library routine syntax
  56. or function availability.  An attempt has been made to surround the occurrences
  57. of such features with conditional compilation directives, so that by defining
  58. or not defining a symbol the correct result can be produced on different
  59. systems.  These commands have all been collected in the include file
  60. parser/env.h, so for the most part this should be the principle file needing
  61. to be edited.  In addition, ``meta-defines'' are provided for many systems to
  62. which the Little Smalltalk system has already been ported.  By defining one
  63. of these ``meta-defines'', correct values are given for the remainder of the
  64. symbols.
  65. .PP
  66. Similarly, the ``standard'' set of flags necessary to use the compiler and/or
  67. loader differ from system to system.  These are given by the two defined
  68. strings, CFLAGS and LFLAGS, in sources/Makefile and parser/Makefile.
  69. .PP
  70. As distributed, the Little Smalltalk system expects the various
  71. subdirectories to remain in the relationship in which they are unbundled.
  72. If desired, however, they can be moved (say to place the sources in one
  73. place, the libraries in another, and the binary in a third).  Each makefile
  74. may contain one of either the strings BINDIR or PARSEDIR at the beginning.
  75. If the binary or parser sources directory is moved, relative the the
  76. directory containing the makefile,
  77. these strings should be changed.  Otherwise, if the
  78. relative positions of the directories remain as they were unbundled, the
  79. default values for these strings can be used.
  80. .PP
  81. There are a few places where path specifications must be given in either
  82. the Makefiles or in C sources.  These are described in the following sections.
  83. .PP
  84. Finally, bytecodes are kept in the form of ``unsigned characters''; that is,
  85. characters containing numbers from 0-255.  These may or may not be
  86. supported on various machines.  The file parser/env.h contains a typedef
  87. for the type `uchar' and two macros for converting from unsigned characters
  88. to integers and back again.  These should be defined in such a manner that
  89. the appearance of unsigned characters is achieved, whether or not they are
  90. actually supported.  A simple test program, called uchar.c, is provided in
  91. /parser.  This program can be used to test the correctness of the macros
  92. defined in env.h.
  93. Generally, either the model of the VAX-780 or the PDP11/70 should be sufficient.
  94. .NH 2
  95. Bringing Little Smalltalk Up on a New System
  96. .PP
  97. If the system you are attempting to port to is not one of the systems described
  98. in the following sections, a certain amount of experimentation will probably be
  99. necessary to successfully install the system.  This section will describe some
  100. of the major changes required; what other changes may be necessary is
  101. generally unpredictable.
  102. .PP
  103. The strings CFLAGS and LFLAGS in sources/Makefile and parser/Makefile should
  104. be set to the appropriate values for ``normal'' compiles and loads of
  105. C programs.
  106. .PP
  107. The file prelude/Makefile contains a hard path in the string PREPATH.
  108. This should be set to the path to the prelude directory.
  109. .PP
  110. The file parser/env.h contains various hard paths, which are described in
  111. that file.  Also in that file, the following symbols should be defined or
  112. left undefined, depending upon the availability of various features.
  113. .IP CURSES 1i
  114. This symbol should be defined if it is desired to provide the simple ascii
  115. graphics given by the curses and termcap packages.  See section on
  116. graphics below.
  117. .IP ENVSAVE 1i
  118. This symbol should be defined if it is necessary to save the value of the
  119. global varible \fIenviron\fP during a fastload.
  120. This is necessary on the 11/70, IBM PC, possibly other machines.
  121. .IP FACTMAX 1i
  122. This symbol should be defined to be the largest integer for which the factorial
  123. can be computed by repeated multiplication without overflow.
  124. This value is generally 12 for 32 bit machines and 8 for 16 bit machines.
  125. .IP FASTDEFAULT 1i
  126. This symbol should be defined if the default behavior of the system should
  127. be to perform a fast load on the standard prelude (see section 3).
  128. .IP FLUSHREQ 1i
  129. If defined a fflush() is given after every call to printf.
  130. .IP GAMMA 1i
  131. This symbol should be defined if the gamma() function is part of the standard
  132. math library, left undefined otherwise.
  133. .IP INLINE 1i
  134. This symbol should be defined if in-line code is desired for object increments
  135. and decrements.  In line code is generally slightly faster, although the code
  136. size is slightly larger.  If this symbol is not defined subroutine calls
  137. will be generated for object increments and decrements.
  138. .IP NOSYSTEM 1i
  139. This symbol should be defined on non-unix systems for which the
  140. ``system()'' call is not supported.  As this seriously limits functionality
  141. (i.e. class descriptions cannot be modified during execution) is should not
  142. be used unless necessary.
  143. .IP OPEN3ARG 1i
  144. This symbol should be defined if Berkeley 4.2 style open
  145. statements (3 arguments)
  146. are used.  If the older, 2 argument, format is used this symbol should be left
  147. undefined.
  148. .IP PLOT3 1i
  149. This symbol should be defined if you have terminals for which the plot(3)
  150. routines can write directly to the screen, rather than requiring a
  151. postprocessing filter.  See section on graphics below.
  152. .IP SETJUMP 1i
  153. This symbol should be defined if the setjump/longjump facility is
  154. available.  This is used ONLY in the file sources/process.c to implement
  155. recovery when the user has typed an interrupt character.
  156. .IP SHORTDATA 1i
  157. If this symbol is defined various heuristics are used to reduce the data
  158. segment size, at the expense of functionality or execution speed.  Should
  159. only be defined if absolutely necessary.
  160. .IP SIGS
  161. This symbol should be defined if the signals facility is available.  This
  162. is used ONLY in the file sources/process.c to implement recovery when the
  163. user has typed an interrupt character.
  164. .PP
  165. Also in parser/env.h, defines are provided to implement the datatype
  166. ``unsigned character''.  These were described in the last section.  Generally,
  167. either following the model of the VAX-780 or the PDP11/70 should be sufficient
  168. for most machines.
  169. .NH 2
  170. Berkeley lookalikes
  171. .PP
  172. It has been reported that following the directions for Berkeley 4.2
  173. (below) is also sufficient for the following systems:
  174. .DS I
  175. Ahmdal / System V
  176. Pyramid 90x / System V
  177. Sequent Balance 8000
  178. .DE
  179. .NH 2
  180. Berkeley near-lookalikes
  181. .PP
  182. It has also been reported that following the directions for Berkeley 4.2 is
  183. sufficient for installation on the following systems, with the
  184. one change that the symbol ENVSAVE should be defined in parser/env.h.
  185. Note that on these systems, and other systems sharing the same
  186. characteristics, the only indication that ENVSAVE should be defined will be
  187. an obscure error message (usually ``-f: is not an identifier'') produced by the
  188. shell if an attempt is made to load a class description following a
  189. fast-load.
  190. .DS I
  191. Plexus P/35
  192. Tektronix 6130 (presumably other Tek 61xx and 62xx machines).
  193. .DE
  194. .NH 2
  195. AT&T 3B2, System V
  196. .PP
  197. The 3B2 does not have floating point hardware, and thus requires floating
  198. point simulation software being linked in.  This is accomplished by adding
  199. ``\-f'' to CFLAGS \fIand\fP LFALGS in the makefiles in /sources and
  200. /parser.  Other than for this change, the instructions for Berkeley 4.2 can
  201. be used for the installation.
  202. .NH 2
  203. Dec Professional 350
  204. .PP
  205. In parser/Makefile the strings CFLAGS and LFLAGS should be left blank.
  206. In sources/Makefile, however, the string CFLAGS should be defined to be ``\-m'',
  207. to indicate the use of the code-mapping feature.  The normal construction rule
  208. for the executable file st should be commented out, and the more complicated
  209. loader instruction inserted in its place.  The appropriate rule is given in
  210. a comment in the Makefile.
  211. .PP
  212. The string PREPATH in prelude/Makefile should be defined to be the path to
  213. the prelude directory (this can be discovered by typing ``pwd'' in the
  214. prelude directory).
  215. .PP
  216. In parser/env.h the ``meta-define'' DECPRO should be given, and any other
  217. meta-defines removed.
  218. Also in env.h the paths in the strings TEMPFILE, PARSER and PRELUDE should
  219. be defined.  Note that /usr/tmp is not standard on Venix systems, and /tmp
  220. should be used instead.
  221. .PP
  222. Because of the severe memory limitations on this machine, only Smalltalk
  223. programs that produce a relatively small number of objects can be executed.
  224. In fact, some of the later self tests fail with ``can't happen 1'' (out of
  225. memory space).
  226. Also, as more primitives are added to the system the size of primitive.o
  227. keeps creeping towards the magic 8K limit on object file sizes for the code
  228. mapping feature.  Eventually it may be necessary to split primitive.c into
  229. two files in order to avoid this problem.
  230. .NH 2
  231. HP 9000 / HP-UX
  232. .PP
  233. Follow the instructions for the VAX 780 / Berkeley 4.2 (below) with the
  234. exception that the meta-define should be given as HP9000 instead of BERK42.
  235. Note that in the filenames in env.h that /usr has been changed to /users,
  236. except for /usr/tmp, which hasn't (a foolish consistency is the hobgoblin
  237. of little minds).
  238. The fastsave routines have not been adapted to the HP extended memory
  239. system, and thus fastsave should not be used.
  240. .NH 2
  241. IBM PC-XT
  242. .PP
  243. It has been reported that the instructions given for the PDP 11/70 (below)
  244. are also sufficient for the IBM PC-XT running PC/IX.
  245. .NH 2
  246. PDP 11/70 (also 11/44)
  247. .PP
  248. In sources/Makefile and parser/Makefile the string CFLAGS should be left blank,
  249. however LFLAGS should be set to ``\-i'' to indicate the use of
  250. separate instruction and data spaces.
  251. .PP
  252. The string PREPATH in prelude/Makefile should be defined to be the path to
  253. the prelude directory (this can be discovered by typing ``pwd'' in the
  254. prelude directory).
  255. .PP
  256. In parser/env.h the ``meta-define'' PDP1170 should be given, and any other
  257. meta-defines removed.
  258. Also in env.h the paths in the strings TEMPFILE, PARSER and PRELUDE should
  259. be defined.
  260. .NH 2
  261. Perkin Elmer
  262. .PP
  263. The Perkin Elmer supports unsigned characters the same as the VAX, however
  264. it does not have the gamma function in the standard library.  Follow the
  265. instructions for the VAX/4.2, using the meta-define PERKELM.
  266. .NH 2
  267. RIDGE / ROS 3.0
  268. .PP
  269. Follow the instructions for the VAX 780 /Berkeley 4.2 (below),
  270. with the exception that the
  271. meta-define should be given as RIDGE instead of BERK42.
  272. The fast save feature does not work on the Ridge.
  273. .NH 2
  274. VAX 780 / Berkeley 4.2
  275. .PP
  276. In parser/Makefile and sources/Makefile the strings CFLAGS and LFLAGS should
  277. both be left blank.
  278. .PP
  279. The string PREPATH in prelude/Makefile should be defined to be the path to
  280. the prelude directory (this can be discovered by typing ``pwd'' in the
  281. prelude directory).
  282. .PP
  283. In parser/env.h the ``meta-define'' BERK42 should be given, and any other
  284. meta-defines removed.
  285. Also in env.h the paths in the strings TEMPFILE, PARSER and PRELUDE should
  286. be defined.
  287. .PP
  288. (VAX only) If the \-g flag is used the define FLUSHREQ need not be given
  289. (although it
  290. will work if it is present), otherwise FLUSHREQ should be defined in order
  291. for input and output to interleave correctly.
  292. .PP
  293. As distributed, the system does not perform a fastload (see next section)
  294. automatically.  If fastload works this can be made default by defining the
  295. symbol FASTDEFAULT.
  296. .PP
  297. These instructions appear to work also for the SUN workstation; of course,
  298. if you have a SUN workstation you can run the Xerox system.
  299. .NH
  300. Fast Loading
  301. .PP
  302. The Little Smalltalk system has the ability to save and restore a user
  303. environment by basically moving a copy of all of the users data space into
  304. a file.  Although this produces rather large files, the savings in time
  305. permitted by not having to recreate a specific environment can be
  306. substantial.  Because this is such an unusual thing to do, it is probably
  307. wise, if installing the system on a new machine/operating system, to first
  308. comment out the define for FASTDEFAULT in parser/env.h,
  309. which will install a system which will not default to doing a fast load.
  310. .PP
  311. Once such a system has been created and passed all self tests, you can
  312. experiment with fast loading by executing the st command with the argument
  313. \-f.  For test cases you can use the programs in /tests.  If it appears to
  314. be successful, then (by defining the variable FASTDEFAULT) you should
  315. regenerate the system so that the default behavior is to do a fast loading.
  316. (When regenerating the system, sources/main.c should be the only file
  317. needing to be recompiled).
  318. .PP
  319. Fastloading does not currently work on the HP-9000.
  320. It may not work on other machines as well.
  321. .NH
  322. Protections
  323. .PP
  324. The directories /sources and /parser need not be readable by casual users.
  325. The directory /prelude contains files, however, which must be loaded by
  326. the Little Smalltalk system prior to every execution.  The protection of this
  327. directory, and on the files in it, should therefore be such that all users
  328. have READ access.
  329. Although the /tests directory is only used during system installation,
  330. users may want to refer to it for examples of class descriptions and to see
  331. how various problems (8 queens, dinning philosophers) have been solved in
  332. Smalltalk.
  333. Allowing all users access to the /docs directory will permit a kind of
  334. on-line access, however users should not be allowed to modify any files in
  335. any directory.
  336. .NH
  337. Non-UNIX systems
  338. .PP
  339. Non-UNIX\s-2\u*\d\s+2
  340. .FS
  341. * UNIX is a trademark of AT&T Bell Laboratories.
  342. .FE
  343. systems which do not support multiple user processes, and thus the
  344. system() call, cannot at current run Little Smalltalk.  There are plans,
  345. however, to at some time in the future support such systems.  This section
  346. will describe, in broad terms, the changes required.  The detailed changed
  347. are, of course, at the moment not known.
  348. .PP
  349. First, the defined value NOSYSTEM must be given in parser/env.h.  This
  350. will cause all occurrences of the ``system()'' call to be commented out,
  351. and in most cases be replaced by error messages.
  352. .PP
  353. Next, the parser must be modified to place its output in a file (presumably
  354. the file given as argument with .st replaced by .p) instead of the standard
  355. output.  This is a trivial, although probably system specific, change.
  356. .PP
  357. In use, the user would then be required to ``compile'' all class
  358. descriptions by running the parser (which therefore would have to be user
  359. accessible program) before running the Little Smalltalk system.  Little
  360. Smalltalk could not be used to edit class descriptions on the fly \- the
  361. user would have to leave the system, perform the edit, and return to the
  362. system.  This would seriously limit functionality and utility, but that is
  363. cost of not running UNIX!
  364. .NH
  365. Graphics
  366. .PP
  367. The nice bit-mapped graphics display of the Smalltalk-80 system is,
  368. unfortunately, not very portable to conventional machines running
  369. conventional ascii terminals.
  370. Two mutually exclusive approaches have been furnished
  371. for providing \fBvery\fP rudimentary but
  372. nevertheless relatively device-independent graphics capabilities.
  373. .PP
  374. The first approach used the curses(3) and termlib(3) routines to provide
  375. simple ascii (character-level) graphics.
  376. To use these, define
  377. the symbol CURSES in parser/env.h, and modify the Makefile in /sourses
  378. adding the libraries -lcurses and -ltermlib (or termcap, whichever is
  379. appropriate) to the symbol LIB.
  380. .PP
  381. The functionality so provided can be described as follows:
  382. .IP clearScreen 1i
  383. This message is accepted by the pseudo-variable smalltalk and clears the
  384. screen.
  385. .IP printAt: 1i
  386. This message is accepted by instances of class String.  The argument must
  387. be a point, representing a line@column pair.  The string is printed at the
  388. point.
  389. .PP
  390. In addition, there is a class \fBForm\fP found in /prelude, which is an
  391. attempt at providing simple graphics forms.  Instances of \fBForm\fP also
  392. repond to printAt:.  A sample program plane.st can be found in /tests
  393. illustrating some of the features of forms.
  394. Refer to the Makesfiles in /prelude and /tests for more information.
  395. .PP
  396. The second approach uses the plot(3) routines.  On some terminals
  397. (the Tektronix 4014, for example) these routines can be set up to
  398. write directly to the terminal screen, rather than going through a
  399. postprocessing filter.  If such a device is available, the symbol PLOT3
  400. should be defined in parser/env.h, in addition appropriate loader commands
  401. (-l4014, for example) should be added to the symbol LIB in
  402. sources/Makefile.
  403. .PP
  404. The functionality so provided is the ability to produce lines, circles and
  405. arcs.  Various classes (Pen, PenSave and Form) for doing this are provided
  406. in the /prelude subdirectory, consult the Makefile for details.
  407. A test program (penshow) is provided in the /tests subdirectory.
  408. .NH
  409. Troubleshooting
  410. .PP
  411. Here are a few of the problems you might run into, and possible solutions:
  412. .PP
  413. The first thing to suspect if you observe strange behavior is the
  414. fastloading feature.  Try running the system with the \-m flag, which will
  415. turn off fastloading.  For example, on the 11/70 fastloading will inhibit
  416. the )i command from working correctly, but no error messages will be
  417. generated.  The appearance of a message such as ``\fIxxx\fP: is not
  418. an identifier'', or of can't happen message number 23
  419. is also a clue that fastloading does not work and should be disabled.
  420. Similarly, the appearance of the message ``no such context as:
  421. \fIxxx\fP/stdsave'' during startup is an indication that the file
  422. containing the saved binary form of the standard prelude either does not
  423. exist or is unreadable, or that the path given in parser/env.h is wrong.
  424. .PP
  425. The appearence of the message ``xxx: not an identifier'' following a fast
  426. load or a )l command may be a sign that the environment pointer is being
  427. trashed.   Try defining the symbol ENVSAVE and recreating the system.
  428. .PP
  429. Solutions to problems with fastloading are to try to
  430. to recreate the stdsave file in /prelude, or as a last resort to remove the
  431. definition for FASTDEFAULT from /parser/env.h, ``make clean''
  432. and recompile everything.
  433. This latter step will configure a system that will not attempt fastloading
  434. unless explicitly called for.
  435. .PP
  436. If the function _gamma is undefined following load for st.  Solution: remove
  437. the definition for the symbol GAMMA, ``make clean'' and recompile.
  438. .PP
  439. \&``Cant't happen number 1''.  If you are running on a machine with small
  440. memory, your program creates too many objects and runs out of memory.  If
  441. you are running on a vax or other large machine - your application is
  442. creating cycles or many many objects, probably a programming error.
  443. .PP
  444. No output appears when you start the program, and if you type control-D all
  445. the output appears.  Solution: define the symbol FLUSHREQ and recompile.
  446. .PP
  447. Can't happen number 22 - either TEMPFILE is unreadable, or
  448. /prelude/standard does not exist.
  449. .PP
  450. Systems that have trouble with long lines may have difficulty with the file
  451. syms.c in /sources (there is one line in that file over 300 characters long).
  452. If necessary, this file can (and will be) automatically reconstructed from
  453. other files in the directory.
  454. .PP
  455. Receiving error number 129 whenever any non-primitive class method is
  456. called may be a symptom of a clash of variable names.  On older systems the
  457. variables runningProcess and runningInterpreter would clash on systems that
  458. did not support long variable names.  The variable runningInterpreter (in
  459. process.c) has since been changed to presentInterpreter, so this problem
  460. should not occur in software taken from more recent distribution tapes.
  461. .PP
  462. 129 errors can also be caused by bad preludes.  Try removing all the .p
  463. files from /prelude and remaking standard.
  464. (Frequently, if you receive an error when first building the prelude, some
  465. of the .p files will be incorrect).
  466. .PP
  467. Note that /sources and /prelude have make instructions ``make clean'' which
  468. remove object files and are useful in insuring the files are in a clean
  469. state before starting a reconstruction of the system.
  470. .NH
  471. Further Distribution
  472. .PP
  473. The Little Smalltalk system is public domain, and may be distributed
  474. further as long as proper attribution is given in all published references.
  475. .PP
  476. In the interests of keeping the distribution up to date and as error free
  477. as possible, we wish to keep track of known sites using the
  478. system.  People interested in being placed on the mailing list for future
  479. bug announcements and new version announcements should contact Professor
  480. Budd, at the address listed below.  Changes, modifications, or improvements
  481. to the code or the standard library can be submitted also, and will be
  482. considered for inclusion in future distributions.
  483. .NH
  484. What to do with BUGS
  485. .PP
  486. Observed irregularities in Little Smalltalk behavior during execution
  487. (hereafter known as ``Bugs'') should be reported to:
  488. .DS I
  489. Professor Tim Budd
  490. Little Smalltalk Distribution
  491. Department of Computer Science
  492. Oregon State University
  493. Corvallis, Oregon 97331 USA
  494.  
  495. CSNET address:  budd@oregon-state.csnet
  496. UUCP  address:  budd@orstcs.uucp
  497. .DE
  498. .LP
  499. The report of the bug should indicate whether it is reproducible, and if so
  500. how it is manifested.  If it is available, a description of the fix for the
  501. bug should be given, and it will be incorporated into future distributions.
  502. Periodically, a listing of known bug fixes will be mailed to known sites.
  503. .PP
  504. The Little Smalltalk system is distributed without responsibility for the
  505. performance of the system and without any guarantee of maintenance.
  506.